package DesignPatern.A08_调停者模式.A002_调停者模式解决;

import java.util.Random;

/**
 * @Author: Du
 * @Date: 2021/7/23 9:14
 */
public class Sale extends AbstractColleague
{
    public Sale(AbstractMediator mediator)
    {
        super(mediator);
    }
    
    public void sellIBM(int number)
    {
        super.mediator.execute("sale", number);
    }
    
    public int getSaleStatus()
    {
        Random rand = new Random();
        int saleCount = rand.nextInt(100);
        System.out.println("售价" + saleCount);
        return saleCount;
    }
    
    public void OffSale()
    {
        super.mediator.execute("offsell");
    }
    
}
